Imports System.Windows.Forms
Imports Dao
Imports System.Data
Imports DTO
Public Class NhanvienBus
    Inherits AbstractBus
    Public Sub New()
    End Sub
    Public Sub New(ByVal ConnectionString As KetNoiDto)
        ketnoi = ConnectionString
    End Sub
#Region "Xử Lý"
    Public Sub Them(ByVal Dto As Nhanviendto)
        Dim Dao As New NhanvienDao(ketnoi)
        If Dto.NVSP = "" Then Dto.NVSP = "NV" & Dto.MaNV
        If Dto.TenNV = "" Then Dto.TenNV = Dto.TenHT
        If Dto.TenHT = "" Then Dto.TenHT = Dto.TenNV
        Dao.Them(Dto)
    End Sub
    Public Sub Xoa(ByVal ma As Integer)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.Xoa(ma)
    End Sub
    Public Sub sua(ByVal Dto As Nhanviendto)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.sua(Dto)
    End Sub
#End Region
    Public Function LayBangTableIlist() As IList
        Dim Dao As New NhanvienDao(ketnoi)
        Dim aList As New ArrayList
        For i As Integer = 0 To Dao.Rows.Count - 1
            Dim dtoNhanvien As Nhanviendto = LayBangDTo(i, Dao)
            aList.Add(dtoNhanvien)
        Next
        Return aList
    End Function
    Public Function LayBangTableSQL(ByVal sql As String) As DataTable
        Dim Dao As New AbstractDao(sql, sql, ketnoi)
        Return Dao
    End Function
    Public Sub suaNVSP(ByVal NVSP As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaNVSP(NVSP, ma)
    End Sub
    Public Sub suaTenNV(ByVal TenNV As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaTenNV(TenNV, ma)
    End Sub
    Public Sub suaTenHT(ByVal TenHT As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaTenHT(TenHT, ma)
    End Sub
    Public Sub suaChucvu(ByVal Chucvu As System.Int32, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaChucvu(Chucvu, ma)
    End Sub
    Public Sub suaDonvi(ByVal Donvi As System.Int32, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaDonvi(Donvi, ma)
    End Sub
    Public Sub suaQuyen(ByVal Quyen As System.Int32, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaQuyen(Quyen, ma)
    End Sub
    Public Sub suaCardNo(ByVal CardNo As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaCardNo(CardNo, ma)
    End Sub
    Public Sub suaNgaysinh(ByVal Ngaysinh As System.DateTime, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaNgaysinh(Ngaysinh, ma)
    End Sub
    Public Sub suaGioitinh(ByVal Gioitinh As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaGioitinh(Gioitinh, ma)
    End Sub
    Public Sub suaDiachi(ByVal Diachi As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaDiachi(Diachi, ma)
    End Sub
    Public Sub suaCMND(ByVal CMND As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaCMND(CMND, ma)
    End Sub
    Public Sub suaNgayvaolam(ByVal Ngayvaolam As System.DateTime, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaNgayvaolam(Ngayvaolam, ma)
    End Sub
    Public Sub suaHinh(ByVal Hinh As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaHinh(Hinh, ma)
    End Sub
    Public Sub suaTrangthai(ByVal Trangthai As System.Int32, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaTrangthai(Trangthai, ma)
    End Sub
    Public Sub suaGhichu(ByVal Ghichu As System.String, ByVal ma As String)
        Dim dao As New NhanvienDao(ketnoi)
        dao.SuaGhichu(Ghichu, ma)
    End Sub
    Public Function LayBangTableIlist(ByVal ma As Integer) As IList
        Dim Dao As New NhanvienDao(ma, ketnoi)
        Dim aList As New ArrayList
        For i As Integer = 0 To Dao.Rows.Count - 1
            Dim dtoNhanvien As Nhanviendto = LayBangDTo(i, Dao)
            aList.Add(dtoNhanvien)
        Next
        Return aList
    End Function
    Public Function LayBangTableTheoMaNV(ByVal MaNV As System.Int32) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoMaNV(MaNV)
        Return Dao
    End Function
    Public Function LayBangTableTheoMaNV(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoMaNV(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoMaNV(ByVal MaNV As System.Int32)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoMaNV(MaNV)
    End Sub
    Public Function LayBangTableTheoNVSP(ByVal NVSP As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNVSP(NVSP)
        Return Dao
    End Function
    Public Function LayBangTableTheoNVSP(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNVSP(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoNVSP(ByVal NVSP As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoNVSP(NVSP)
    End Sub
    Public Function LayBangTableTheoTenNV(ByVal TenNV As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTenNV(TenNV)
        Return Dao
    End Function
    Public Function LayBangTableTheoTenNV(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTenNV(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoTenNV(ByVal TenNV As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoTenNV(TenNV)
    End Sub
    Public Function LayBangTableTheoTenHT(ByVal TenHT As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTenHT(TenHT)
        Return Dao
    End Function
    Public Function LayBangTableTheoTenHT(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTenHT(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoTenHT(ByVal TenHT As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoTenHT(TenHT)
    End Sub
    Public Function LayBangTableTheoChucvu(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoChucvu(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoChucvu(ByVal Chucvu As System.Int32)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoChucvu(Chucvu)
    End Sub
    Public Function LayBangTableTheoDonvi(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoDonvi(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoDonvi(ByVal Donvi As System.Int32)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoDonvi(Donvi)
    End Sub
    Public Function LayBangTableTheoQuyen(ByVal Quyen As System.Int32) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoQuyen(Quyen)
        Return Dao
    End Function
    Public Function LayBangTableTheoQuyen(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoQuyen(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoQuyen(ByVal Quyen As System.Int32)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoQuyen(Quyen)
    End Sub
    Public Function LayBangTableTheoCardNo(ByVal CardNo As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoCardNo(CardNo)
        Return Dao
    End Function
    Public Function LayBangTableTheoCardNo(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoCardNo(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoCardNo(ByVal CardNo As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoCardNo(CardNo)
    End Sub
    Public Function LayBangTableTheoNgaysinh(ByVal Ngaysinh As System.DateTime) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgaysinh(Ngaysinh)
        Return Dao
    End Function
    Public Function LayBangTableTheoNgaysinh(ByVal Ngaysinh1 As System.DateTime, ByVal Ngaysinh2 As System.DateTime) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgaysinh(Ngaysinh1, Ngaysinh2)
        Return Dao
    End Function
    Public Function LayBangTableTheoNgaysinh(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgaysinh(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoNgaysinh(ByVal Ngaysinh As System.DateTime)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoNgaysinh(Ngaysinh)
    End Sub
    Public Function LayBangTableTheoGioitinh(ByVal Gioitinh As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoGioitinh(Gioitinh)
        Return Dao
    End Function
    Public Function LayBangTableTheoGioitinh(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoGioitinh(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoGioitinh(ByVal Gioitinh As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoGioitinh(Gioitinh)
    End Sub
    Public Function LayBangTableTheoDiachi(ByVal Diachi As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoDiachi(Diachi)
        Return Dao
    End Function
    Public Function LayBangTableTheoDiachi(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoDiachi(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoDiachi(ByVal Diachi As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoDiachi(Diachi)
    End Sub
    Public Function LayBangTableTheoCMND(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoCMND(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoCMND(ByVal CMND As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoCMND(CMND)
    End Sub
    Public Function LayBangTableTheoNgayvaolam(ByVal Ngayvaolam As System.DateTime) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgayvaolam(Ngayvaolam)
        Return Dao
    End Function
    Public Function LayBangTableTheoNgayvaolam(ByVal Ngayvaolam1 As System.DateTime, ByVal Ngayvaolam2 As System.DateTime) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgayvaolam(Ngayvaolam1, Ngayvaolam2)
        Return Dao
    End Function
    Public Function LayBangTableTheoNgayvaolam(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoNgayvaolam(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoNgayvaolam(ByVal Ngayvaolam As System.DateTime)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoNgayvaolam(Ngayvaolam)
    End Sub
    Public Function LayBangTableTheoHinh(ByVal Hinh As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoHinh(Hinh)
        Return Dao
    End Function
    Public Function LayBangTableTheoHinh(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoHinh(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoHinh(ByVal Hinh As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoHinh(Hinh)
    End Sub
    Public Function LayBangTableTheoTrangthai(ByVal Trangthai As System.Int32) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTrangthai(Trangthai)
        Return Dao
    End Function
    Public Function LayBangTableTheoTrangthai(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoTrangthai(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoTrangthai(ByVal Trangthai As System.Int32)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoTrangthai(Trangthai)
    End Sub
    Public Function LayBangTableTheoGhichu(ByVal Ghichu As System.String) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoGhichu(Ghichu)
        Return Dao
    End Function
    Public Function LayBangTableTheoGhichu(ByVal ARRAY1 As ArrayList) As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangTheoGhichu(ARRAY1)
        Return Dao
    End Function
    Public Sub XOAbangTableTheoGhichu(ByVal Ghichu As System.String)
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.XOABangTheoGhichu(Ghichu)
    End Sub
    Public Function LayBangDTo(ByVal ma As Integer) As Nhanviendto
        Dim Dao As New NhanvienDao(ma, ketnoi)
        Dim dto As New Nhanviendto
        If Dao.Rows.Count <= 0 Then Return dto
        Try
            If IsDBNull(Dao.Rows(0)("MaNV")) = False Then
                dto.MaNV = Dao.Rows(0)("MaNV")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("NVSP")) = False Then
                dto.NVSP = Dao.Rows(0)("NVSP")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("TenNV")) = False Then
                dto.TenNV = Dao.Rows(0)("TenNV")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("TenHT")) = False Then
                dto.TenHT = Dao.Rows(0)("TenHT")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Chucvu")) = False Then
                dto.Chucvu = Dao.Rows(0)("Chucvu")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Donvi")) = False Then
                dto.Donvi = Dao.Rows(0)("Donvi")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Quyen")) = False Then
                dto.Quyen = Dao.Rows(0)("Quyen")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("CardNo")) = False Then
                dto.CardNo = Dao.Rows(0)("CardNo")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Ngaysinh")) = False Then
                dto.Ngaysinh = Dao.Rows(0)("Ngaysinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Gioitinh")) = False Then
                dto.Gioitinh = Dao.Rows(0)("Gioitinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Diachi")) = False Then
                dto.Diachi = Dao.Rows(0)("Diachi")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("CMND")) = False Then
                dto.CMND = Dao.Rows(0)("CMND")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Ngayvaolam")) = False Then
                dto.Ngayvaolam = Dao.Rows(0)("Ngayvaolam")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Hinh")) = False Then
                dto.Hinh = Dao.Rows(0)("Hinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Trangthai")) = False Then
                dto.Trangthai = Dao.Rows(0)("Trangthai")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(Dao.Rows(0)("Ghichu")) = False Then
                dto.Ghichu = Dao.Rows(0)("Ghichu")
            End If
        Catch ex As Exception
        End Try
        Return dto
    End Function
    Public Function LayBangDTo(ByVal i As Integer, ByVal dao As DataTable) As Nhanviendto
        Dim dto As New Nhanviendto
        If dao.Rows.Count <= 0 Then Return dto
        Try
            If IsDBNull(dao.Rows(i)("MaNV")) = False Then
                dto.MaNV = dao.Rows(i)("MaNV")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("NVSP")) = False Then
                dto.NVSP = dao.Rows(i)("NVSP")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("TenNV")) = False Then
                dto.TenNV = dao.Rows(i)("TenNV")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("TenHT")) = False Then
                dto.TenHT = dao.Rows(i)("TenHT")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Chucvu")) = False Then
                dto.Chucvu = dao.Rows(i)("Chucvu")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Donvi")) = False Then
                dto.Donvi = dao.Rows(i)("Donvi")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Quyen")) = False Then
                dto.Quyen = dao.Rows(i)("Quyen")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("CardNo")) = False Then
                dto.CardNo = dao.Rows(i)("CardNo")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Ngaysinh")) = False Then
                dto.Ngaysinh = dao.Rows(i)("Ngaysinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Gioitinh")) = False Then
                dto.Gioitinh = dao.Rows(i)("Gioitinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Diachi")) = False Then
                dto.Diachi = dao.Rows(i)("Diachi")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("CMND")) = False Then
                dto.CMND = dao.Rows(i)("CMND")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Ngayvaolam")) = False Then
                dto.Ngayvaolam = dao.Rows(i)("Ngayvaolam")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Hinh")) = False Then
                dto.Hinh = dao.Rows(i)("Hinh")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Trangthai")) = False Then
                dto.Trangthai = dao.Rows(i)("Trangthai")
            End If
        Catch ex As Exception
        End Try
        Try
            If IsDBNull(dao.Rows(i)("Ghichu")) = False Then
                dto.Ghichu = dao.Rows(i)("Ghichu")
            End If
        Catch ex As Exception
        End Try
        Return dto
    End Function
    Public Function LayBangDTo(ByVal dong As Integer, ByVal dao As DataGridView) As Nhanviendto
        Dim dto As New Nhanviendto
        If dao.Rows.Count <= 0 Then Return dto
        For cot As Integer = 0 To dao.Columns.Count - 1
            Try
                dto.HoTro(dao.Columns(cot).DataPropertyName, dao.Item(cot, dong).Value)
            Catch ex As Exception
            End Try
        Next
        Return dto
    End Function
    Public Function layBangNhieuTable() As DataTable
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.layBangNhieuTable()
        Return Dao
    End Function
    Public Sub Taotable()
        Dim Dao As New NhanvienDao(ketnoi)
        Dao.TaoTable()
    End Sub

#Region "Them"
    Public Function mathem() As Integer
        Dim dao As New NhanvienDao(ketnoi)
        dao.MaThem()
        Return dao.Rows(0).Item(0)
    End Function
    Public Function layBangtableCodk(ByVal dk As System.String) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTableCodk(dk)
        Return dao
    End Function
    Public Function LayBangTable() As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTable()
        Return dao
    End Function
    

    Public Function LayBangTabletheodonviCoLich(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheodonviCoLich(madv)
        Return dao
    End Function
    Public Function LayBangTabletheodonviKhongCoLich(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheodonviKhongCoLich(madv)
        Return dao
    End Function
    Public Function LayBangTabletheodonvi(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheodonvi(madv)
        Return dao
    End Function
    Public Function LayBangTabletheodonviBT(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheodonviBT(madv)
        Return dao
    End Function
    Public Function LocNhanVienUSB(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LocNhanVienUSB(madv)
        Return dao
    End Function

    Public Function LocNhanVienUSBAll() As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LocNhanVienUSBAll()
        Return dao
    End Function


    Public Function LayBangTabletheodonviDemo(ByVal madv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheodonviDemo(madv)
        Return dao
    End Function
    Public Function LayBangTabletheoCMND(ByVal cmnd As String) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheoCMND(cmnd)
        Return dao
    End Function
    Public Function LayBangTabletheochucvu(ByVal macv As Integer) As DataTable
        Dim dao As New NhanvienDao(ketnoi)
        dao.LayBangTabletheochucvu(macv)
        Return dao
    End Function
#End Region
End Class

